package com.sugon.modules.device.consts.enums;

import java.util.Map;
import java.util.TreeMap;

/**
 * @author ： YuXD
 * @description： 设备维护工单状态枚举类
 * @date ： 2023-01-11
 * @version: 1.0
 */
public enum DevMaintenanceTicketStatusEnum {

    DISPATCHING(1, "待派工"),
    WAIT_EXECUTE(3, "待开始"),
    MAINTAINING(4, "维护中"),
    DELAY_APPLYING(5, "延期申请中"),
    DELAY_MAINTAINING(6, "延期维护中"),
    COMPLETE(7, "完成"),
    STOP(8, "终止"),
    DELAY_COMPLETE(9, "延期完成"),
    OVERTIME(10, "超期未完成");

    private Integer value;

    private String desc;

    DevMaintenanceTicketStatusEnum(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public Integer getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }

    public static Map<Integer, DevMaintenanceTicketStatusEnum> map() {
        Map<Integer, DevMaintenanceTicketStatusEnum> map = new TreeMap<>();
        DevMaintenanceTicketStatusEnum[] enums = values();
        for (DevMaintenanceTicketStatusEnum devMaintenanceTicketStatusEnum : enums) {
            map.put(devMaintenanceTicketStatusEnum.getValue(), devMaintenanceTicketStatusEnum);
        }
        return map;
    }

}
